import 'package:json_annotation/json_annotation.dart';

part 'user_entity.g.dart';

@JsonSerializable()
class UserEntity {
  UserUserinfo? userInfo;
  String? token;

  UserEntity({
    this.userInfo,
    this.token,
  });

  factory UserEntity.fromJson(Map<String, dynamic> json) => _$UserEntityFromJson(json);

  Map<String, dynamic> toJson() => _$UserEntityToJson(this);
}

@JsonSerializable()
class UserUserinfo {
  String? avatarUrl;
  String? nickName;
  String? mobile;

  UserUserinfo({
    this.avatarUrl,
    this.nickName,
  });

  factory UserUserinfo.fromJson(Map<String, dynamic> json) => _$UserUserinfoFromJson(json);

  Map<String, dynamic> toJson() => _$UserUserinfoToJson(this);
}